package kr.hkit.powerjava.chapter22.work3;

import java.util.HashMap;
import java.util.LinkedList;

import kr.hkit.powerjava.chapter22.work3.dao.DepartmentImpl;
import kr.hkit.powerjava.chapter22.work3.dao.StudentImpl;
import kr.hkit.powerjava.chapter22.work3.vo.Department;
import kr.hkit.powerjava.chapter22.work3.vo.Student;

public class TestMain {

	public static void main(String[] args) {
		LinkedList<Student> stdList = new LinkedList<>();
		StudentImpl sm = new StudentImpl(stdList);
		
		sm.addItem(new Student(1, "김태희", 11, 11, 12));
		sm.addItem(new Student(2, "이민희", 15, 15, 15));
		sm.prnItems();
		
		HashMap<Integer, Department> deptList = new HashMap<>();
		DepartmentImpl dm = new DepartmentImpl(deptList);
		
		dm.addItem(new Department(1, "컴공", 2));
		dm.addItem(new Department(2, "화공", 2));
		dm.addItem(new Department(3, "뭐지", 1));
		
		dm.prnItems();
		
		dm.updateItem(new Department(1, "컴공", 3));
		dm.prnItems();
	}
}
